package com.athuiju.fenxiaoback.controller;


import com.athuiju.fenxiaoback.entity.vo.FareVo;
import com.athuiju.fenxiaoback.service.WmsWareInfoService;
import com.athuiju.fenxiaoback.utils.JwtUtils;
import com.athuiju.fenxiaoback.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 仓库信息 前端控制器
 * </p>
 *
 * @author athuiju
 * @since 2021-07-06
 */
@RestController
@RequestMapping("/fenxiaoback/wms-ware-info")
public class WmsWareInfoController {

    @Autowired
    private WmsWareInfoService wareInfoService;



    @GetMapping("/fare")
    public R getFare(@RequestParam("addrId") Long addrId, HttpServletRequest request){
        String memberid = JwtUtils.getMemberIdByJwtToken(request);
        FareVo fare = wareInfoService.getFare(addrId,memberid);
        return R.ok().setData(fare);
    }

}

